package com.dglg.spring.service.impl;

import com.dglg.spring.dao.DocumentDao;
import com.dglg.spring.model.Document;
import com.dglg.spring.service.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DocumentServiceImpl implements DocumentService {

    @Autowired
    DocumentDao documentDao;

    @Override
    public int insertFileMess(Document document) {
        return this.documentDao.insertFileMess(document);
    }

    @Override
    public List<Document> getDocuments(String className) {
        return this.documentDao.getDocuments(className);
    }

    @Override
    public int deleteFile(String className, String documentName) {
        return this.documentDao.deleteFile(className, documentName);
    }
}
